#ifndef DATAMANAGEDIALOG_H
#define DATAMANAGEDIALOG_H

#include "popupdialog.h"

#include <QDialog>
#include <QStyledItemDelegate>


namespace Ui {
class DataManageDialog;
}
class RobotDelegate: public QStyledItemDelegate{

    Q_OBJECT
public:
    explicit RobotDelegate(QObject *parent = nullptr);
    void paint(QPainter *painter, const QStyleOptionViewItem &option,
               const QModelIndex &index) const override;

     bool editorEvent(QEvent *event, QAbstractItemModel *model,
                      const QStyleOptionViewItem &option, const QModelIndex &index) override;



     // QAbstractItemDelegate interface
 public:
     QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
};

class DataManageDialog : public PopupDialog
{
    Q_OBJECT

public:
    explicit DataManageDialog(QWidget *parent = nullptr);
    ~DataManageDialog();

protected:
    void setupData();
private slots:
    void on_close_btn_clicked();

    void on_new_robot_btn_clicked();

    void on_new_site_btn_clicked();

private:
    void scaleWidgets(QWidget *widget, double xScale,double yScale);
    Ui::DataManageDialog *ui;
};

#endif // DATAMANAGEDIALOG_H
